
public class Car {
    private String brand;   //品牌
    private String color;   //颜色
    private int price;    // 价格
    private String carNumber;   //车牌号
    //构造方法：
    public Car(){}
    //有参构造
    public Car(String brand, String color, int price, String carNumber) {
        this.brand = brand;
        this.color = color;
        this.price = price;
        this.carNumber = carNumber;
    }
    //get/set
    public String getBrand(){
        return brand;
    }
    public void setBrand(){
        this.brand = brand;
    }
    public String getColor(){
        return color;
    }
    public void setColor(){
        this.color = color;
    }
    public int getPrice(){
        return price;
    }
    public void setPrice(){
        this.price = price;
    }
    public String getCarNumber(){
        return carNumber;
    }
    public void setCarNumber(){
        this.carNumber = carNumber;
    }
    //显示信息的方法
    public void showCaeInfo(){
        System.out.println("汽车品牌："+this.brand+","+"汽车颜色:"+this.color+","+"汽车价格："+this.price+","+"汽车车牌："+this.carNumber+"\t");
    }
}